﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WeiXinPF.Model
{
    /// <summary>
    /// 评价信息
    /// </summary>
    public class wx_shop_product_comment
    {
        public int Id { get; set; }

        public int wid { get; set; }

        /// <summary>
        /// 用户OpenId
        /// </summary>
        public string OpenId { get; set; }

        /// <summary>
        /// 订单Id
        /// </summary>
        public int OrderId { get; set; }

        //商家Id
        public int BusinessId { get; set; }

        //商家Id
        public BusinessType BusinessType { get; set; }
        //商品id
        public int ProductId { get; set; }
        //规格id
        public int SkuId { get; set; }
        /// <summary>
        /// 评价内容
        /// </summary>
        public string Content { get; set; }

        /// <summary>
        /// 评价分数
        /// </summary>
        public int Score { get; set; }

        /// <summary>
        /// 评价时间
        /// </summary>
        public DateTime CreateTime { get; set; }


        /// <summary>
        /// 评价等级
        /// </summary>
        public int Rank { get; set; }


        /// <summary>
        /// 审核状态
        /// </summary>
        public AduitStatus Status { get; set; }


        /// <summary>
        /// 审核人
        /// </summary>
        public int Auditor { get; set; }

        public List<wx_shop_product_commentimage> Images { get; set; }

        public string Skuname { get; set; }

        public string Username { get; set; }

        public string Productname { get; set; }

        public string ImagePath { get; set; }
    }

    public class wx_shop_product_commentimage
    {
        /// <summary>
        /// 评价Id
        /// </summary>
        public int CommentImageId { get; set; }
        /// <summary>
        /// 评价Id
        /// </summary>
        public int CommentId { get; set; }


        /// <summary>
        /// 原图路径
        /// </summary>
        public string Path { get; set; }

        /// <summary>
        /// 缩略图的路径
        /// </summary>
        public string ThumbPath { get; set; }
    }

    public enum BusinessType
    {
        Shop = 0,
        Catering = 1,
        Hotel = 2
    }

    public enum AduitStatus
    {
        待审 = 1,
        通过 = 2,
        未通过 = 3,
        所有 = 4
    }

    public enum RankLevel
    {
        全部 = 0,
        好评 = 1,
        中评 = 2,
        差评 = 3
    }

    /// <summary>
    /// 商品评价统计类
    /// 包含总共多少评价、多少好评、中评及差评等
    /// </summary>
    public class wx_shop_product_comment_stat
    {
        public int ProductId { get; set; }
        public string ProductName { get; set; }
        /// <summary>
        /// 所有评论数
        /// </summary>
        public int TotalCount { get; set; }
        /// <summary>
        /// 好评数
        /// </summary>
        public int GoodCount { get; set; }
        /// <summary>
        /// 中评数
        /// </summary>
        public int MediumCount { get; set; }
        /// <summary>
        /// 差评数
        /// </summary>
        public int NegativeCount { get; set; }
    }

    public class wx_shop_product_commentjson
    {
        public List<wx_shop_product_comment> commentlist { get; set; }

        public int totalcount { get; set; }
    }
}
